package com.bifrost.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.math.BigInteger;
import java.util.List;


/**
 * The persistent class for the SKU_SNAPSHOT database table.
 */
@Entity
@Table(name = "SKU_SNAPSHOT")
@NamedQuery(name = "SkuSnapshot.findAll", query = "SELECT s FROM SkuSnapshot s")
public class SkuSnapshot implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "SKU_SNAPSHOT_ID", unique = true, nullable = false)
    private Long skuSnapshotId;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "ACTIVE_END_DATE")
    private Date activeEndDate;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "ACTIVE_START_DATE")
    private Date activeStartDate;

    @Column(name = "ADDL_PRODUCT_ID")
    private BigInteger addlProductId;

    @Column(name = "CAN_ADD_CART")
    private Boolean canAddCart;

    @Column(name = "CONTAINER_SHAPE", length = 255)
    private String containerShape;

    @Column(name = "CONTAINER_SIZE", length = 255)
    private String containerSize;

    @Column(name = "DEFAULT_PRODUCT_ID")
    private BigInteger defaultProductId;

    @Column(name = "DIMENSION_UNIT", length = 255)
    private String dimensionUnit;

    @Column(name = "DISPLAY_TEMPLATE", length = 255)
    private String displayTemplate;

    @Column(name = "EXTERNAL_ID", length = 64)
    private String externalId;

    @Column(name = "FULFILLMENT_TYPE", length = 64)
    private String fulfillmentType;

    @Column(name = "INVENTORY_TYPE", length = 64)
    private String inventoryType;

    @Column(name = "IS_ARCHIVED")
    private Boolean isArchived;

    @Column(name = "IS_AVAILABLE")
    private Boolean isAvailable;

    @Column(name = "IS_DISCOUNTABLE")
    private Boolean isDiscountable;

    @Lob
    @Column(name = "LONG_DESCRIPTION")
    private String longDescription;

    @Column(name = "ORDER_ITEM_ID")
    private BigInteger orderItemId;

    @Column(name = "RETAIL_PRICE", precision = 10, scale = 5)
    private BigDecimal retailPrice;

    @Column(name = "SALE_PRICE", precision = 10, scale = 5)
    private BigDecimal salePrice;

    @Column(name = "SKU_COST", precision = 10, scale = 5)
    private BigDecimal skuCost;

    @Column(name = "SKU_DESCRIPTION", length = 255)
    private String skuDescription;

    @Column(name = "SKU_GIRTH", precision = 10, scale = 2)
    private BigDecimal skuGirth;

    @Column(name = "SKU_HEIGHT", precision = 10, scale = 2)
    private BigDecimal skuHeight;

    @Column(name = "SKU_ID")
    private BigInteger skuId;

    @Column(name = "SKU_NAME", length = 100)
    private String skuName;

    @Column(name = "SKU_UPC", length = 32)
    private String skuUpc;

    @Column(name = "SKU_URL", length = 255)
    private String skuUrl;

    @Column(name = "SKU_WEIGHT", precision = 10, scale = 2)
    private BigDecimal skuWeight;

    @Column(name = "SKU_WIDTH", precision = 10, scale = 2)
    private BigDecimal skuWidth;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "UPDATED_TIMESTAMP")
    private Date updatedTimestamp;

    @Column(name = "WEIGHT_UNIT_OF_MEASURE", length = 10)
    private String weightUnitOfMeasure;

    //bi-directional many-to-one association to OrderItem
    @OneToMany(mappedBy = "skuSnapshot")
    @org.hibernate.annotations.ForeignKey(name = "none")
    private List<OrderItem> orderItems;

    public SkuSnapshot() {
    }

    public Long getSkuSnapshotId() {
        return this.skuSnapshotId;
    }

    public void setSkuSnapshotId(Long skuSnapshotId) {
        this.skuSnapshotId = skuSnapshotId;
    }

    public Date getActiveEndDate() {
        return this.activeEndDate;
    }

    public void setActiveEndDate(Date activeEndDate) {
        this.activeEndDate = activeEndDate;
    }

    public Date getActiveStartDate() {
        return this.activeStartDate;
    }

    public void setActiveStartDate(Date activeStartDate) {
        this.activeStartDate = activeStartDate;
    }

    public BigInteger getAddlProductId() {
        return this.addlProductId;
    }

    public void setAddlProductId(BigInteger addlProductId) {
        this.addlProductId = addlProductId;
    }

    public Boolean getCanAddCart() {
        return this.canAddCart;
    }

    public void setCanAddCart(Boolean canAddCart) {
        this.canAddCart = canAddCart;
    }

    public String getContainerShape() {
        return this.containerShape;
    }

    public void setContainerShape(String containerShape) {
        this.containerShape = containerShape;
    }

    public String getContainerSize() {
        return this.containerSize;
    }

    public void setContainerSize(String containerSize) {
        this.containerSize = containerSize;
    }

    public BigInteger getDefaultProductId() {
        return this.defaultProductId;
    }

    public void setDefaultProductId(BigInteger defaultProductId) {
        this.defaultProductId = defaultProductId;
    }

    public String getDimensionUnit() {
        return this.dimensionUnit;
    }

    public void setDimensionUnit(String dimensionUnit) {
        this.dimensionUnit = dimensionUnit;
    }

    public String getDisplayTemplate() {
        return this.displayTemplate;
    }

    public void setDisplayTemplate(String displayTemplate) {
        this.displayTemplate = displayTemplate;
    }

    public String getExternalId() {
        return this.externalId;
    }

    public void setExternalId(String externalId) {
        this.externalId = externalId;
    }

    public String getFulfillmentType() {
        return this.fulfillmentType;
    }

    public void setFulfillmentType(String fulfillmentType) {
        this.fulfillmentType = fulfillmentType;
    }

    public String getInventoryType() {
        return this.inventoryType;
    }

    public void setInventoryType(String inventoryType) {
        this.inventoryType = inventoryType;
    }

    public Boolean getIsArchived() {
        return this.isArchived;
    }

    public void setIsArchived(Boolean isArchived) {
        this.isArchived = isArchived;
    }

    public Boolean getIsAvailable() {
        return this.isAvailable;
    }

    public void setIsAvailable(Boolean isAvailable) {
        this.isAvailable = isAvailable;
    }

    public Boolean getIsDiscountable() {
        return this.isDiscountable;
    }

    public void setIsDiscountable(Boolean isDiscountable) {
        this.isDiscountable = isDiscountable;
    }

    public String getLongDescription() {
        return this.longDescription;
    }

    public void setLongDescription(String longDescription) {
        this.longDescription = longDescription;
    }

    public BigInteger getOrderItemId() {
        return this.orderItemId;
    }

    public void setOrderItemId(BigInteger orderItemId) {
        this.orderItemId = orderItemId;
    }

    public BigDecimal getRetailPrice() {
        return this.retailPrice;
    }

    public void setRetailPrice(BigDecimal retailPrice) {
        this.retailPrice = retailPrice;
    }

    public BigDecimal getSalePrice() {
        return this.salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public BigDecimal getSkuCost() {
        return this.skuCost;
    }

    public void setSkuCost(BigDecimal skuCost) {
        this.skuCost = skuCost;
    }

    public String getSkuDescription() {
        return this.skuDescription;
    }

    public void setSkuDescription(String skuDescription) {
        this.skuDescription = skuDescription;
    }

    public BigDecimal getSkuGirth() {
        return this.skuGirth;
    }

    public void setSkuGirth(BigDecimal skuGirth) {
        this.skuGirth = skuGirth;
    }

    public BigDecimal getSkuHeight() {
        return this.skuHeight;
    }

    public void setSkuHeight(BigDecimal skuHeight) {
        this.skuHeight = skuHeight;
    }

    public BigInteger getSkuId() {
        return this.skuId;
    }

    public void setSkuId(BigInteger skuId) {
        this.skuId = skuId;
    }

    public String getSkuName() {
        return this.skuName;
    }

    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public String getSkuUpc() {
        return this.skuUpc;
    }

    public void setSkuUpc(String skuUpc) {
        this.skuUpc = skuUpc;
    }

    public String getSkuUrl() {
        return this.skuUrl;
    }

    public void setSkuUrl(String skuUrl) {
        this.skuUrl = skuUrl;
    }

    public BigDecimal getSkuWeight() {
        return this.skuWeight;
    }

    public void setSkuWeight(BigDecimal skuWeight) {
        this.skuWeight = skuWeight;
    }

    public BigDecimal getSkuWidth() {
        return this.skuWidth;
    }

    public void setSkuWidth(BigDecimal skuWidth) {
        this.skuWidth = skuWidth;
    }

    public Date getUpdatedTimestamp() {
        return this.updatedTimestamp;
    }

    public void setUpdatedTimestamp(Date updatedTimestamp) {
        this.updatedTimestamp = updatedTimestamp;
    }

    public String getWeightUnitOfMeasure() {
        return this.weightUnitOfMeasure;
    }

    public void setWeightUnitOfMeasure(String weightUnitOfMeasure) {
        this.weightUnitOfMeasure = weightUnitOfMeasure;
    }

    public List<OrderItem> getOrderItems() {
        return this.orderItems;
    }

    public void setOrderItems(List<OrderItem> orderItems) {
        this.orderItems = orderItems;
    }

    public OrderItem addOrderItem(OrderItem orderItem) {
        getOrderItems().add(orderItem);
        orderItem.setSkuSnapshot(this);

        return orderItem;
    }

    public OrderItem removeOrderItem(OrderItem orderItem) {
        getOrderItems().remove(orderItem);
        orderItem.setSkuSnapshot(null);

        return orderItem;
    }

}